package shared.tsPojo

import upickle.default._

/**
 * Created by yz on 6/6/2022
 */
object Analysis {

  object CellLineDepImage {

    case class Request(geneName: String, order: String)

    implicit val requestRw = macroRW[Request]

    case class Response(valid: Boolean, base64: String = "", message: String = "", geneData: String = "")

    implicit val responseRw = macroRW[Response]

  }

  object CellLineScatterImage {

    case class Request(geneName: String, xAxis: String, yAxis: String, linear: String)

    implicit val requestRw = macroRW[Request]

    case class Response(valid: Boolean, base64: String = "", message: String = "", geneData: String = "")

    implicit val responseRw = macroRW[Response]

  }

  object SurvivalImage {

    case class Request(geneName: String, tumorType: String, dataset: String, survivalData: String,
                       upperCutoff: String, lowerCutoff: String)

    implicit val requestRw = macroRW[Request]

    case class Response(valid: Boolean, base64: String = "", message: String = "", geneData: String = "")

    implicit val responseRw = macroRW[Response]

  }

  object ComparisonImage {

    case class Request(geneName: String, species: String, haps: List[String], hbps: List[String],
                       hads: List[String], hbds: List[String], testMethod: String, log: String,
                       maps: List[String], mbps: List[String], mads: List[String], mbds: List[String],
                       mams: List[String], mbms: List[String])

    implicit val requestRw = macroRW[Request]

    case class Response(valid: Boolean, base64: String = "", message: String = "", geneData: String = "")

    implicit val responseRw = macroRW[Response]

  }

  object AllGene {

    case class Request(q: String, page: Int, pageSize: Int, species: String)

    implicit val requestRw = macroRW[Request]

    case class Response(valid: Boolean, base64: String = "", message: String = "", geneData: String = "")

    implicit val responseRw = macroRW[Response]

  }


}
